package com.wolfalpha.lwtool.service;

import java.util.List;

import android.graphics.Bitmap;

import com.wolfalpha.lwtool.exception.InternetErrorException;
import com.wolfalpha.lwtool.vo.CountInfo;
import com.wolfalpha.lwtool.vo.LWJob;

/**
 * 存放到数据库
 * 
 * @author ttStudio
 * 
 */
public interface UserService {
	

	// 企业登录
	public int login(String user, String password)
			throws InternetErrorException;
	
	/**
	 * 获取发布的信息
	 * @return 
	 * @throws Exception
	 */
	public List<LWJob> getPublishedList(boolean expired, boolean closed,
			boolean deleted, int page, int limit) throws Exception;
	
	/**
	 *更新我的工作
	 * @param spec = 1:删除
	 * @param spec = 0:停招
	 * @return 
	 * @throws Exception
	 */
	public boolean modifyMyJob(int spec,int jobid) throws Exception;

	// 管理员登录
	public boolean adminLogin(String mobile, String email) throws Exception;

	// 管理员获取统计数据
	public CountInfo adminGetCount() throws Exception;
	/**
	// 管理员获取未审核的数据
	// 包括兼职信息
	// 包括商家信息
	 * 查看具体信息
	 * @param spec
	 *            = 1 :企业信息
	 * @param spec
	 *            = 0:兼职信息
	 * @throws Exception
	 */
	public void adminGetNuaudite(int spec) throws Exception;

	/**
	 * 查看具体信息
	 * @param spec
	 *            = 1 :企业信息
	 * @param spec
	 *            = 0:兼职信息
	 * @throws Exception
	 */
	public String adminViewInfo(int spec) throws Exception;

	/**
	 * 审核信息
	 * @param spec
	 *            = 1 :企业信息
	 * @param spec
	 *            = 0:兼职信息
	 *   @return 操作成功与否
	 * @throws Exception
	 */
	public boolean adminAudite(int spec,int id,int isPass,String reason,String detail) throws Exception;

	/**
	 * 发布兼职
	 * @param name
	 * @param category
	 * @param contact
	 * @param tel
	 * @param region
	 * @param address
	 * @param type
	 * @param wage
	 * @param wageType
	 * @param payoff
	 * @param time
	 * @param days
	 * @param limit
	 * @param intro
	 * @param requirement
	 * @return
	 * @throws InternetErrorException
	 */
	public int publishJob(String name, int category, String contact, String tel,
			int region, String address, int type, int wage, int wageType,
			int payoff, int time, String days, int limit, String intro,
			String requirement) throws InternetErrorException;

	public String getComLicPic(int id) throws Exception;

	Bitmap getImage(String u_path);
}
